package tabinactivity.eastandroid.com;

import android.content.Intent;
import android.os.Bundle;
import android.widget.Button;
import android.widget.TabHost;

public class SecondTabActivity extends BaseTabActivity {

	public TabHost mTabHost;

	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);

		setContentView(R.layout.secondtab_activity);

		mTabHost = (TabHost) findViewById(R.id.tab);
		mTabHost.setup(getLocalActivityManager());
		Button tabButton;

		tabButton = (Button) new Button(mContext);
		tabButton.setText("SecondTabItem1");
		mTabHost.addTab(mTabHost.newTabSpec(tabButton.getText().toString()).setContent(new Intent(this, SecondTabItem1Activity.class)).setIndicator(tabButton));

		tabButton = (Button) new Button(mContext);
		tabButton.setText("SecondTabItem2");
		mTabHost.addTab(mTabHost.newTabSpec(tabButton.getText().toString()).setContent(new Intent(this, SecondTabItem2Activity.class)).setIndicator(tabButton));

	}

	@Override
	protected void onNewIntent(Intent intent) {
		// TODO Auto-generated method stub
		super.onNewIntent(intent);
	}

}